home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
076-100
/
disk_087
/
elib
/
t.c
< prev
Wrap
C/C++ Source or Header
|
1992-05-06
|
829b
|
45 lines
/* t.c -- elib test caller */
#include <exec/types.h>
#include <stdio.h>
#include <functions.h>
#define RTC printf("return to continue - ");fflush(stdout);getchar()
APTR libbase;
/* this name of this variable is important,
* since interface routines need to access
* its contents.
*/
/* life is simple if library routines return LONG integers */
LONG GetDown();
LONG Double();
#define DOUBARG 19
main()
{
LONG retval;
printf("here we go\n");
libbase = (APTR) OpenLibrary("mylib.library", 0L);
printf("openlib returns base: %lx\n", libbase);
RTC;
if (libbase)
{
/* test function GetDown() */
retval = GetDown();
printf("called getdown, %ld returned\n", retval);
RTC;
/* test function Double() */
printf("double of %d = %ld\n", DOUBARG, Double((LONG)DOUBARG));
RTC;
CloseLibrary(libbase);
}
}